# Maintainer: Steffen Nurpmeso <steffen@sdaoden.eu>
pkgname=s-postgray
pkgver=0.8.1
pkgrel=0
pkgdesc="postfix RFC 6647 graylisting policy server"
url="https://www.sdaoden.eu/code.html#s-toolbox"
arch="all"
license="ISC"
makedepends="linux-headers"
subpackages="$pkgname-doc"
source="https://ftp.sdaoden.eu/s-postgray-$pkgver.tar.gz"

build() {
	local sandbox=0
	case "$CARCH" in
	x86_64)
		sandbox=1
		;;
	esac
	make VAL_OS_SANDBOX=$sandbox
}

check() {
	./s-postgray-test.sh
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

sha512sums="
1f1150c32d03c993ddd3316eba378f49dbfeb8871c337eef2fd103569b64904e398555938f89f438891c537395f42b87654748ee4073a6656d00f024797ffbe0  s-postgray-0.8.1.tar.gz
"
